/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.prep;

import java.awt.geom.Point2D;
import java.io.Serializable;

public class MapNode extends Point2D implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private double x;
	private double y;
	private int label = 0;
	private boolean isBoundary = false;
	
//*****************************************************************************
	
	public MapNode() {
		this(0, 0);
	}
	
//*****************************************************************************
	
	public MapNode(double x, double y) {
		this(x, y, 0);
	}
	
//*****************************************************************************
	
	public MapNode(double x, double y, int lb) {
		this.x = x;
		this.y = y;
		this.label = lb;
	}
	
//*****************************************************************************
	
	public MapNode(Point2D p) {
		this.x = p.getX();
		this.y = p.getY();
	}
	
//*****************************************************************************
	
    public Point2D getP1() {
        return this;
    }
    
//*****************************************************************************
	
    public double getX() {
        return x;
    }
    
//*****************************************************************************
	
    public double getY() {
        return y;
    }
    
//*****************************************************************************
	
    public void setLocation(double x, double y) {
        this.x = x;
        this.y = y;
    }
	
//*****************************************************************************
	
	public void setLabel(int lb) {
		this.label = lb;
	}
	
//*****************************************************************************
	
	public int getLabel( ) {
		return label;
	}
	
//*****************************************************************************
	
	public void setBoundary(boolean b) {
		this.isBoundary = b;
	}
	
//*****************************************************************************
	
	public boolean getBoundary( ) {
		return isBoundary;
	}
	
//*****************************************************************************
}

